<?php


namespace App\Servers;

use App\Exceptions\ViewException;

class View
{
    // 加载视图
    public static function make($file, array $vars = []) {
        $file = 'Views/'. $file . '.blade.php';
        if (!is_file($file)) {
            throw new ViewException("模块文件${file}不存在！");
        }
        include $file;
    }
}